<?php  

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class branch extends CI_Controller {
	function __construct()
	{
		parent::__construct();
		
		// check if user logged in 
		if (!$this->ion_auth->logged_in())
	  	{
			redirect('auth/login');
	  	}		
		$this->load->library('form_validation');
		$this->load->model('product/product_model');	
			$this->load->library('datatables');		
	}
	function get_branch(){
		echo $this->product_model->get_branch();
	}
	function get_warehouse(){
		echo $this->product_model->get_warehouse();
	}
	
	
	function get_branch_product(){
		//list the users
	   $this->data['users'] = $this->product_model->get_branch_product()->result();
	   $meta['page_title'] = "Branch Product";
	   $this->load->view('common/header', $meta);
	   $this->load->view('product/branch/view_branch_product1');
       $this->load->view('common/footer');
	   
		}
	
	function get_warehouse_product(){
	 //  $this->data['users'] = $this->product_model->get_warehouse_product()->result();
	   $meta['page_title'] = "Warehouse Product";
	   $this->load->view('common/header', $meta);
	   $this->load->view('product/branch/view_warehouse_product1');
       $this->load->view('common/footer');
	   
		}


}
?>